home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-20 | 3.3 KB | 110 lines | [TEXT/MMCC] |
- // *****************************************************************************
- //
- // WindoidUtil.h
- //
- // —————————————————————————————————————————————————————————————————————————————
- // Copyright © 1991-95 Infinity Systems. All rights reserved.
- // —————————————————————————————————————————————————————————————————————————————
- #ifndef Infinity_WINDOIDUTIL
- #define Infinity_WINDOIDUTIL
-
- #include "WindoidDefines.h"
-
- #include <QuickDraw.h>
- #include <Types.h>
- #include <Windows.h>
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // Macros to make code cleaner
- //
- // —————————————————————————————————————————————————————————————————————————————
- #define IsOdd(value) ((value) & 1)
- #define IsEven(value) (!IsOdd(value))
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // Generally useful routines
- //
- // —————————————————————————————————————————————————————————————————————————————
- Boolean HasSystem7();
-
- Boolean HasCQDraw();
-
- void SyncPorts();
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // OurDeviceLoop
- //
- // —————————————————————————————————————————————————————————————————————————————
- #if !defined(USESROUTINEDESCRIPTORS) && !defined(GENERATINGCFM)
- // Support for non-Universal Headers.
- typedef DeviceLoopDrawingProcPtr DeviceLoopDrawingUPP;
- #endif
-
- #if SystemSevenOrLater
- #define OurDeviceLoop(drawingRgn, drawingProc, userData, flags) \
- DeviceLoop(drawingRgn, drawingProc, userData, flags)
- #else
- void OurDeviceLoop(RgnHandle drawingRgn, DeviceLoopDrawingUPP drawingProc,
- long userData, DeviceLoopFlags flags);
- #endif
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // Window Color Table color access
- //
- // —————————————————————————————————————————————————————————————————————————————
- void WctbForeColor(WindowPeek window, short partCode);
-
- void WctbBackColor(WindowPeek window, short partCode);
-
- void AvgWctbForeColor(WindowPeek window, short light, short dark, short shade);
-
- void AvgWctbBackColor(WindowPeek window, short light, short dark, short shade);
-
- void ColorsNormal();
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // CheckDisplay
- //
- // —————————————————————————————————————————————————————————————————————————————
- // Determine if the device is adequate for drawing in color with System 7.
- // —————————————————————————————————————————————————————————————————————————————
- Boolean CheckDisplay(short theDepth, short deviceFlags, GDHandle targetDevice,
- WindowPeek window);
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // General utility drawing routines
- //
- // —————————————————————————————————————————————————————————————————————————————
- void MoveRectTo(Rect *theRect, short left, short top);
-
- void FrameBox(const Rect *theRect);
-
- void FrameTopLeftShading(Rect theRect);
-
- void FrameBottomRightShading(Rect theRect);
-
-
- // —————————————————————————————————————————————————————————————————————————————
- //
- // Window position/size access
- //
- // —————————————————————————————————————————————————————————————————————————————
- void GetGlobalMappingPoint(WindowPeek window, Point *thePoint);
-
- void GetGlobalContentRect(WindowPeek window, Rect *contentRect);
-
-
- // —————————————————————————————————————————————————————————————————————————————
- #endif